The Whitby Wizard is very good for boys - you can easily spend an afternoon in there if weather less than brilliant.
The museum in Pannet Park also brill.
The beach is all you need if the weather is good
If the boys are good walkers you can walk to Robin Hood's Bay but there are some steep drops so need supervised.It's approx 6 miles-fantastic scenary
I love Artefacts...lovely shop for mum
The Captain Cook museum is also good
Mounterays is a great Italian if you want a break from fish and chips
Sandsend is walkable and nice .
Runswick Bay if you have a car is good for fossil hunting
If the boys are into books try reading 'The Whitby Witches' by Robin Jarvis to them before the trip then they can match up the locations....it's a great children's story.
I second Ingrid Flute for accomodation.
We love Whitby and always have a staycation week at some point in the year.