I have done 3 liveaboards out of Sharm in April, June and August.
August was the worst. Was too hot for comfort, aircon kept packing up, and even the evenings were generally too hot to be outside.
June was wonderful, although indoors, aircon was already a must.
April was the best. The water was 22 degrees, and the air temp was comfortable, although out in open sea it was quite chilly and windy outside. There was absolutely no need for aircon, and I was fine with my 5mm suit doing 4 dives per day.
I have been to Dahab in May and the weather was absolutely perfect and so was the diving. I think therefore that for Sharm, May would probably also be optimal.
Take into account that in January it is dark by 5 o clock, and in May you have light until 8 o clock. This makes a big difference in my opinion.
Happy Diving