1. Some cells change chemical energy into electric energy.

2. Some cells change chemical energy into electrical energy.
-----------------
Do we have to use electric or electrical?

2 is best since you want the adjective form "electrical" to modify "energy."

Preferably the second, but I guess both would work.

Both "electric" and "electrical" can be used in this context, but there is a slight difference in their usage.

The word "electric" is often used to describe something related to electricity, such as an electric charge or an electric current. On the other hand, "electrical" is often used to describe something relating to the field of electricity, such as electrical circuits or electrical engineering.

In the context of the sentences you provided, both "electric energy" and "electrical energy" would be acceptable. However, "electric energy" is more commonly used and it sounds more natural. So, it would be better to say, "Some cells change chemical energy into electric energy."