If the ships really are travelling at the speed of light, using known physics (which is possible, sort of — see below), then they cannot communicate.
The reason for this is time dilation: the closer to the speed of light the ship moves, the slower its proper time passes. At the limit of a ship moving at the speed of light, no proper time passes for it — from the perspective of the passengers, they arrive at their destination immediately after embarking on their journey. Thus, there will be no time for the passengers to send or receive any messages, or to do anything else, during the journey.
So, how can we make a ship travel at the speed of light using known physics? Well, according to the theory of relativity, only massless particles like photons can reach the speed of light, so we'll have to make the ship (and anything it carries) out of light (or some other massless particles, but light really is the most convenient).
In practice, such a "ship" would be more like a Star Trek transporter than anything one would normally describe as a spaceship: at the departure station, using Sufficiently Advanced Science™, the passengers will be converted into a pulse of light, which is beamed at a distant receiver that reverses the process. As far as the passengers are concerned, the process resembles instantaneous teleportation, although, of course, a year of (coordinate) time will actually have passed for every light year so travelled.
Of course, this process would be a lot more convenient if the "passengers" were already encoded into easily transmissible information — that is, if they were either AIs, or humans (or other originally biological creatures) somehow "uploaded" into software. In fact, if you want to transmit beings with physical bodies this way, the easiest way would be to first scan into a software emulation, transmit the software, and then, if desired, rebuild new bodies for them at the destination. (Hey, I didn't say it would be easy — just easier than the alternatives.)
Or, of course, you can postulate some new physics (or exotic edge cases of current physics theories, such as stable wormholes) that allow faster-than-light travel. In that case, however, you're pretty much free to assume anything you want about how in-flight communications would work (or not work, as it might be). For the specific case of wormhole travel, a reasonably plausible assumption would be that ships travelling through the same wormhole could communicate just like in normal space (after all, a wormhole is normal space, just with a weird geometry), but any signals sent from inside one wormhole to another would have to take a detour through the wormhole mouth(s).