Whales will not attack any mobs (despite their killer whale pattern) and ignore things that are attacking them. They can actually eat the player, but they will blow them right back out from the hole on their back, sending them several yards above the water. They are very slow and only seen by themselves.
Whales need a very large amout of space to spawn, thus making them very rare. They are seen in deep seas alone in any light level.