Pro: They're great if you need endless hot water or don't have space for a traditional water heater. You don't have the standby losses of keeping water hot when there's no demand.
Cons: Depending on energy type, size, and mfg, they can be horrifically energy inefficient compared to modern water heaters in terms of BTU per degree per gallon. (i.e. - Some are pretty decent. Some suk bawls.) They also must be flushed regularly, usually yearly, to combat scale buildup. Finally, they can ultimately be more expensive to purchase compared to a traditional water heater because and retrofitting for one can get spendy.
In general, if you use hot water several times a day but don't need an endless supply, a traditional water heater is likely a better solution. It's cheaper to buy, simpler to install and maintain, and more financially viable overall.
However, if you have a scenario where hot water is needed only occasionally (maybe every few days), or regularly need amounts in excess of what a traditional water heater can supply, then a tankless unit may be a better solution. Just realize that retrofitting for one varies from expensive to '
Damn!', and annual maintenance is an absolute requirement if you want them to last and/or maintain efficiency.
Austin builder Matt Risinger has a good "what to consider" video on tankless vs. traditional.
https://www.youtube.com/watch?v=8RFuFBI3r2c*edit to add* Forgot to mention how critical knowing your water supply temp is when sizing a tankless. You absolutely
must know your water supply temp if you are to get a properly sized unit. There is a finite input/output temp rise for a given BTU heater. If you don't account for the intended delta, it's way easy to undersize the unit. That endless supply doesn't mean much if it's only lukewarm. My sister and BIL found that out the hard way. Ended up having to install additional circuits for a larger unit, and that was on top of the retrofit costs already incurred.
Brad