Darktable handles JPEGs almost as RAWs. It just activates different processing modules by default, and e.g. the demosaicing module is of no effect for obvious reasons. See the Darktables module dependencies diagramDarktables module dependencies diagram. This diagramm is loosely processed from the bottom to the top by darktable. So, the arrows are followed in reverse direction. The user can switch on an off every module, and set parameters.
For RAWs, Darktable activates by default "rawspeed" (i.e. RAW import), "temperature", "demosaic", "basecurve", and "sharpen".
For JPEGs, no module is pre-activated. (No basecurve is applied because this has already been done by the JPEG engine in the camera.)
By and large, that's the whole difference. Darktable tries to do the right thing™ in both cases. You may easily overlook what type of picture you are about to edit.
The "lens" correction module should be used with care because TCA and vignetting correction need proper linear pristine colour spaces to work, but this is usually not the case for JPEGs (normally sRGB). If the JPEG is not yet distortion-corrected, you may well do so, though.
Everything after (top of) the "colorin" module really is the same for JPEG and RAW and can be used freely.
The developers of Darktable seem to shoot in RAW exclusively. This may make JPEG a second-class citizen in Darktable. However, I shoot 80% in JPEG. I use Darktable for 9 months now and it works great for me.
The only thing which is worse for JPEGs is the slower import speed. It is totally sufficient for me, but your milage may vary. Be that as it may, you can test very easily whether the JPEG import speed of Darktable is an issue for you.
Lightroom is not much different. It hides the internal details of the processing of JPEGs and RAWs as well. It doesn't show the implicit processing steps for RAWs as Darktable does, but being more explicit is a general property of Darktable. One may like this or not.
Lightroom mostly refuses to apply lens correction profiles to JPEGs. This is because it may be a bad idea, for example, to correct lens distortion on a JPEG that has already been corrected in the camera. In contrast, Darktable allows lens correction for JPEGs as for RAWs.