Since many smart phone "HDR apps" don't actually do any real HDR so it's useful to define what we are talking about.
HDR stands for "high dynamic range", it's designed for situations where the highlights are too bright and the dark areas are too dark so the camera can't capture the entire range of brightness in a single shot.
HDR is done in two steps:
In the first step the software creates an image that does have the entire brightness range, usually by combining multiple shots at different brightness levels - the result from this step is usually an image that looks bland and boring if viewed directly.
In the second step the software takes the result from the first step and process it to enhance details, colors and local contrast - the produces the "HDR look" of images with saturated colors and details everywhere.
Many HDR apps only perform the second step, they take a single non-HDR image and process it to look HDR-ish, you can recognize them easily because they take just one image - for those apps you need a good camera that is capable of capturing the entire dynamic range of the scene (there are no "good" apps in this category since this is all cheating but you do want the better apps because the not-very-best in the category tend to push the saturation and processing way too far into "clown puke" territory and behind).
The real HDR apps take multiple shots - traditionally at least 3 - and combine them, if you have one of those the app is more important because as the entire HDR technique was invented to overcome camera limitations - so it works pretty well with limited cameras.
Obviously the camera does matter, you can get by with a bad camera and a good app but you'll get better results from a good camera with a good app.