I've got lots of experience with scuba tank compressors and given a choice would never want one on my boat. That said, if the only way to get tank fills because of a remote location, is to have your own compressor, so be it. Smaller portable compressors take a long time to fill tanks, have marginal filtration that should be augmented, and have short life expectancies compared to those used in dive stores. When all costs are factored in over the life of the compressor, it will cost you more to fill tanks off your own compressor than carry them to a dive store.
Given a choice, electric is the best choice provided you have a generator big enough to run it. Diesel and gas require you to maintain a motor that may only get occasional use. They also produce toxic gasses (carbon dioxide, carbon monoxide) which must be prevented from entering the compressor intake. For the same capacity electric compressors can often weigh less allowing them to be more easily moved around. Ideally you want to run the compressor outside as they generate a lot of heat. Also operating them at the up wind end of the boat greatly reduces the risk of generator exhaust entering the compressor intake. If this is to be on a large boat with a well ventilated machinery space, the compressor can be mounted below deck provided the air intake is plumbed outside and away from engine and generator exhaust.
If you would like further information, some specifics on your boat and planned use would be helpful.
Ted