For any sheaf and any local section, we have a general fact that the support of the local section (not to be confused with the support of the sheaf) is closed. (c.f. Hartshorne p.67 ex-2.1.14)
Recall: $\text{supp}(s) := \{x\in \text{dom}(s): s_x\neq 0 \}$.
When $R$ is an integral domain, then the support of the structure sheaf of $\text{Spec}(R)$ is even open (not hard to prove: pass to local the section is represented by some $a/b$, while $a\neq 0$ because $R$ is an domain. This presentation is local, and nonvanishing by definition of "$0$" in a ring of fractions).
Question
If $R$ is just a commutative ring, is there any criterion for that any local section of $\text{Spec}(R)$ has open support?
If $R$ is Noetherian and absolutely flat (meaning that every $R$-module is flat), then $R$ has the property you want. The openness of the support of a local section of $\mathscr{O}_{\mathrm{Spec}(R)}$ can be checked on a covering by standard open sets, and formation of support is compatible with restriction to smaller open sets. This means it is enough to check that for any $f\in R$, any element of $\mathscr{O}_{\mathrm{Spec}(R)}(D(f))=R_f$ has open support. Since $R_f$ is Noetherian and absolutely flat when $R$ is, it is then enough to consider global sections. If $r\in R$, then $\mathrm{supp}(r)=V(\mathrm{Ann}_R(r))$. This is the image of the closed immersion $\mathrm{Spec}(R/\mathrm{Ann}_R(r))\hookrightarrow\mathrm{Spec}(R)$. The assumption that $R$ is absolutely flat ensures that this closed immersion is flat, while the assumption that $R$ is Noetherian ensures that this closed immersion is of finite presentation. A morphism of schemes which is flat and (locally) of finite presentation is necessarily open. Thus $\mathrm{supp}(r)=V(\mathrm{Ann}_R(r))$ is open.