The Fourier transform can be thought of as a special (but very important!) case of the theory of characters : the applications $f_t : \mathbb{R}^n \rightarrow S^1$ given by $f_t(x)=e^{2i \pi }$ are the only continuous group morphisms from $\mathbb{R}^n$ to $S^1$, and Lebesgues measure is the Haar measure of the additive group $(\mathbb{R}^n,+)$.
I don't think changing Euclidean scalar products to another non-degenerate quadratic form would change much of the theory, except for a few constants (seeing as you integrate on all frequencies afterwards anyway, but I haven't thought much about it).
One nice way to see why Fourier transforms are so important in analysis is that it diagonalizes the operator differentiation ! (and of course, differentiating is very important in analysis). More precisely, if $\hat{f}$ is the fourier transform of $f$ regular, then \hat{f'}=2i \pi \hat{f}. And since Fourier transform is injective and you have an inverse formula, you can compute various things in the Fourier domain and then "come back" using the inverse formula.
As for the functions for which it applies : it's clear that it is defined for $L^1(\mathbb{R})$ functions, but it turns out that you can extend it to $L^2(\mathbb{R})$ functions as well (this is classic but non-trivial). It remains injective but both formulas are not true anymore. Also, the inverse formula is valid only if the Fourier transform remains also in $L^1(\mathbb{R})$, which needs not always be the case.
In fact, there is also a generalization to the case of tempered distributions, i.e. distributions that are well behaved at infinity.
Hope that helps. If you want to learn more, I recommend the books of Rudin (Real and complex analysis would be the best place to start).